package com.pingao.mp.modular.sys.service;

import com.pingao.mp.modular.sys.entity.Role;
import com.pingao.mp.modular.sys.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author 闻品高
 * @since 2018-09-26
 */
public interface UserService extends IService<User> {

    Set<Role> getRolesByUsername(String username);

    Set<String> getPermissionsByRole(Set<Role> roles);

    User getUserByUsername(String username);

    Map<String,Object> getUserList(Integer pageNumber, Integer pageSize, String searchText, String sortName, String sortOrder,Integer roleId);

    Map<String,Object> login(String username, String password,Integer rememberMe);

    User getSessionUser();

    Map<String,Object> myInfo(User user);

    String getToken(User user);

    User getUserByIdForRoles(Long userId);
}
